//
//  NetworkTools.swift
//  SwiftWeibo
//
//  Created by Lucky on 16/5/11.
//  Copyright © 2016年 Lucky. All rights reserved.
//

import AFNetworking

class NetworkTools: AFHTTPSessionManager {

    private static let tools:NetworkTools = {
        // baseURL必须以／结尾
        let url = NSURL(string: "https://api.weibo.com/")
        let  t = NetworkTools(baseURL: url)
        t.responseSerializer.acceptableContentTypes = (NSSet(objects: "application/json", "text/json", "text/javascript", "text/html", "text/plain") as! Set<String>)
        return t
    }()
    
    class func shareNetworkTools() -> NetworkTools {
        return tools
    }
    
}
